/*******************************************************************************
 * Size: 24 px
 * Bpp: 4
 * Opts: 
 ******************************************************************************/

#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif

#ifndef FONT_NUM24
#define FONT_NUM24 1
#endif

#if FONT_NUM24

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+0020 " " */

    /* U+002E "." */
    0x0, 0x0, 0xb, 0xb0, 0x5f, 0xf5, 0xa, 0xa0,
    0x0, 0x0,

    /* U+0030 "0" */
    0x0, 0x0, 0x22, 0x0, 0x0, 0x0, 0x8f, 0xee,
    0xe5, 0x0, 0xa, 0xc2, 0x0, 0x4e, 0x60, 0x4d,
    0x0, 0x0, 0x3, 0xf1, 0x97, 0x0, 0x0, 0x0,
    0xc5, 0xb5, 0x0, 0x0, 0x0, 0xa6, 0xb5, 0x0,
    0x0, 0x0, 0xa7, 0xb5, 0x0, 0x0, 0x0, 0xa7,
    0xb5, 0x0, 0x0, 0x0, 0xa7, 0xb5, 0x0, 0x0,
    0x0, 0xa7, 0xb5, 0x0, 0x0, 0x0, 0xa7, 0xb5,
    0x0, 0x0, 0x0, 0xa7, 0xb5, 0x0, 0x0, 0x0,
    0xa7, 0xb5, 0x0, 0x0, 0x0, 0xa6, 0x88, 0x0,
    0x0, 0x0, 0xc4, 0x3e, 0x20, 0x0, 0x5, 0xe0,
    0x7, 0xe5, 0x12, 0x7e, 0x30, 0x0, 0x5c, 0xff,
    0xa2, 0x0,

    /* U+0031 "1" */
    0x0, 0x0, 0x10, 0x0, 0x9, 0xf1, 0x3, 0xdb,
    0xf1, 0x1e, 0x60, 0xf1, 0x2, 0x0, 0xf1, 0x0,
    0x0, 0xf1, 0x0, 0x0, 0xf1, 0x0, 0x0, 0xf1,
    0x0, 0x0, 0xf1, 0x0, 0x0, 0xf1, 0x0, 0x0,
    0xf1, 0x0, 0x0, 0xf1, 0x0, 0x0, 0xf1, 0x0,
    0x0, 0xf1, 0x0, 0x0, 0xf1, 0x0, 0x0, 0xf1,
    0x0, 0x0, 0xf1, 0x0, 0x0, 0xf1,

    /* U+0032 "2" */
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8e,
    0xff, 0xa2, 0x0, 0x0, 0xbc, 0x30, 0x18, 0xe2,
    0x0, 0x7c, 0x0, 0x0, 0x7, 0xc0, 0xc, 0x40,
    0x0, 0x0, 0xe, 0x20, 0x71, 0x0, 0x0, 0x0,
    0xd4, 0x0, 0x0, 0x0, 0x0, 0xf, 0x20, 0x0,
    0x0, 0x0, 0x6, 0xc0, 0x0, 0x0, 0x0, 0x2,
    0xe3, 0x0, 0x0, 0x0, 0x0, 0xd7, 0x0, 0x0,
    0x0, 0x0, 0xaa, 0x0, 0x0, 0x0, 0x0, 0x7d,
    0x0, 0x0, 0x0, 0x0, 0x3f, 0x20, 0x0, 0x0,
    0x0, 0x1e, 0x50, 0x0, 0x0, 0x0, 0xc, 0x90,
    0x0, 0x0, 0x0, 0x9, 0xc0, 0x0, 0x0, 0x0,
    0x5, 0xe2, 0x11, 0x11, 0x11, 0x0, 0xdf, 0xff,
    0xff, 0xff, 0xf4,

    /* U+0033 "3" */
    0x4f, 0xff, 0xff, 0xff, 0xf3, 0x1, 0x11, 0x11,
    0x19, 0xc0, 0x0, 0x0, 0x0, 0x3e, 0x20, 0x0,
    0x0, 0x0, 0xd6, 0x0, 0x0, 0x0, 0xa, 0xa0,
    0x0, 0x0, 0x0, 0x5e, 0x10, 0x0, 0x0, 0x0,
    0x9e, 0xd4, 0x0, 0x0, 0x0, 0x0, 0x5e, 0x40,
    0x0, 0x0, 0x0, 0x4, 0xe0, 0x0, 0x0, 0x0,
    0x0, 0xd3, 0x0, 0x0, 0x0, 0x0, 0xb5, 0x0,
    0x0, 0x0, 0x0, 0xb5, 0x72, 0x0, 0x0, 0x0,
    0xc5, 0xb6, 0x0, 0x0, 0x0, 0xe3, 0x5d, 0x10,
    0x0, 0x7, 0xd0, 0x9, 0xd4, 0x12, 0x8e, 0x20,
    0x0, 0x6d, 0xfe, 0xa2, 0x0,

    /* U+0034 "4" */
    0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0,
    0x4, 0xe0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0x0,
    0x0, 0x0, 0x0, 0x4e, 0x0, 0x0, 0x0, 0x0,
    0xc, 0x60, 0x0, 0x0, 0x0, 0x4, 0xe0, 0x42,
    0x0, 0x0, 0x0, 0xc6, 0xb, 0x50, 0x0, 0x0,
    0x4d, 0x0, 0xb5, 0x0, 0x0, 0xc, 0x60, 0xb,
    0x50, 0x0, 0x4, 0xd0, 0x0, 0xb5, 0x0, 0x0,
    0xc6, 0x0, 0xb, 0x50, 0x0, 0x5d, 0x0, 0x0,
    0xb5, 0x0, 0xd, 0x71, 0x11, 0x1b, 0x61, 0x12,
    0xef, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0,
    0xb, 0x50, 0x0, 0x0, 0x0, 0x0, 0xb5, 0x0,
    0x0, 0x0, 0x0, 0xb, 0x50, 0x0, 0x0, 0x0,
    0x0, 0xb5, 0x0,

    /* U+0035 "5" */
    0x3e, 0xee, 0xee, 0xee, 0xb0, 0x4c, 0x22, 0x22,
    0x22, 0x10, 0x4c, 0x0, 0x0, 0x0, 0x0, 0x4c,
    0x0, 0x0, 0x0, 0x0, 0x4c, 0x0, 0x0, 0x0,
    0x0, 0x4c, 0x0, 0x0, 0x0, 0x0, 0x4c, 0x6d,
    0xfe, 0xa2, 0x0, 0x4f, 0xd4, 0x12, 0x8e, 0x20,
    0x3b, 0x0, 0x0, 0x6, 0xd0, 0x0, 0x0, 0x0,
    0x0, 0xe2, 0x0, 0x0, 0x0, 0x0, 0xb5, 0x0,
    0x0, 0x0, 0x0, 0xb5, 0x72, 0x0, 0x0, 0x0,
    0xc4, 0xb6, 0x0, 0x0, 0x0, 0xe2, 0x5d, 0x10,
    0x0, 0x7, 0xc0, 0x9, 0xd4, 0x12, 0x8e, 0x20,
    0x0, 0x6d, 0xfe, 0xa1, 0x0,

    /* U+0036 "6" */
    0x0, 0x0, 0x0, 0x12, 0x0, 0x0, 0x0, 0x0,
    0xc, 0x60, 0x0, 0x0, 0x0, 0x5, 0xd0, 0x0,
    0x0, 0x0, 0x0, 0xd5, 0x0, 0x0, 0x0, 0x0,
    0x6d, 0x0, 0x0, 0x0, 0x0, 0xe, 0x40, 0x0,
    0x0, 0x0, 0x7, 0xc0, 0x0, 0x0, 0x0, 0x0,
    0xe3, 0x0, 0x0, 0x0, 0x0, 0x8f, 0xce, 0xea,
    0x20, 0x0, 0x1f, 0xc5, 0x23, 0x8e, 0x40, 0x9,
    0xb0, 0x0, 0x0, 0x4e, 0x10, 0xf2, 0x0, 0x0,
    0x0, 0xa7, 0x3d, 0x0, 0x0, 0x0, 0x6, 0xa3,
    0xd0, 0x0, 0x0, 0x0, 0x6a, 0xf, 0x20, 0x0,
    0x0, 0xa, 0x70, 0x9b, 0x0, 0x0, 0x4, 0xe1,
    0x0, 0xbc, 0x41, 0x28, 0xe4, 0x0, 0x0, 0x7d,
    0xfe, 0xa2, 0x0,

    /* U+0037 "7" */
    0xff, 0xff, 0xff, 0xff, 0xfa, 0x11, 0x11, 0x11,
    0x11, 0xb8, 0x0, 0x0, 0x0, 0x0, 0xf2, 0x0,
    0x0, 0x0, 0x5, 0xc0, 0x0, 0x0, 0x0, 0xb,
    0x60, 0x0, 0x0, 0x0, 0x1f, 0x0, 0x0, 0x0,
    0x0, 0x7a, 0x0, 0x0, 0x0, 0x0, 0xd4, 0x0,
    0x0, 0x0, 0x3, 0xe0, 0x0, 0x0, 0x0, 0x9,
    0x80, 0x0, 0x0, 0x0, 0xf, 0x20, 0x0, 0x0,
    0x0, 0x5c, 0x0, 0x0, 0x0, 0x0, 0xb6, 0x0,
    0x0, 0x0, 0x1, 0xf0, 0x0, 0x0, 0x0, 0x7,
    0xa0, 0x0, 0x0, 0x0, 0xd, 0x40, 0x0, 0x0,
    0x0, 0x3e, 0x0, 0x0, 0x0,

    /* U+0038 "8" */
    0x0, 0x2, 0x54, 0x0, 0x0, 0x0, 0xaf, 0xcd,
    0xf6, 0x0, 0xb, 0xb1, 0x0, 0x3e, 0x60, 0x4d,
    0x0, 0x0, 0x4, 0xe0, 0x89, 0x0, 0x0, 0x0,
    0xe3, 0x88, 0x0, 0x0, 0x0, 0xe3, 0x4d, 0x0,
    0x0, 0x3, 0xe0, 0xc, 0x90, 0x0, 0x2d, 0x70,
    0x1, 0xce, 0xab, 0xf8, 0x0, 0x3, 0xec, 0x89,
    0xdb, 0x10, 0x2e, 0x50, 0x0, 0xa, 0xb0, 0x98,
    0x0, 0x0, 0x0, 0xd4, 0xd2, 0x0, 0x0, 0x0,
    0x88, 0xe1, 0x0, 0x0, 0x0, 0x79, 0xc5, 0x0,
    0x0, 0x0, 0xa6, 0x5d, 0x10, 0x0, 0x4, 0xe1,
    0x9, 0xd5, 0x12, 0x7e, 0x40, 0x0, 0x5c, 0xfe,
    0xb3, 0x0,

    /* U+0039 "9" */
    0x0, 0x0, 0x35, 0x51, 0x0, 0x0, 0x2, 0xde,
    0xbc, 0xf9, 0x0, 0x2, 0xe6, 0x0, 0x1, 0xbb,
    0x0, 0xb7, 0x0, 0x0, 0x0, 0xd5, 0x1f, 0x0,
    0x0, 0x0, 0x6, 0xa3, 0xd0, 0x0, 0x0, 0x0,
    0x4c, 0x2f, 0x0, 0x0, 0x0, 0x5, 0xb0, 0xd5,
    0x0, 0x0, 0x0, 0xb6, 0x4, 0xe3, 0x0, 0x0,
    0x8e, 0x0, 0x6, 0xfa, 0x78, 0xdf, 0x60, 0x0,
    0x1, 0x7a, 0x9a, 0xd0, 0x0, 0x0, 0x0, 0x0,
    0xe4, 0x0, 0x0, 0x0, 0x0, 0x7b, 0x0, 0x0,
    0x0, 0x0, 0x1f, 0x30, 0x0, 0x0, 0x0, 0x9,
    0xa0, 0x0, 0x0, 0x0, 0x2, 0xf1, 0x0, 0x0,
    0x0, 0x0, 0xb8, 0x0, 0x0, 0x0, 0x0, 0x3e,
    0x10, 0x0, 0x0,

    /* U+003A ":" */
    0x0, 0x0, 0x1d, 0xc0, 0x5f, 0xf4, 0x8, 0x80,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0xb, 0xb0, 0x5f, 0xf5, 0xa, 0xa0,
    0x0, 0x0
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 95, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
    {.bitmap_index = 0, .adv_w = 104, .box_w = 4, .box_h = 5, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 10, .adv_w = 179, .box_w = 10, .box_h = 18, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 100, .adv_w = 188, .box_w = 6, .box_h = 18, .ofs_x = 3, .ofs_y = 0},
    {.bitmap_index = 154, .adv_w = 188, .box_w = 11, .box_h = 18, .ofs_x = 0, .ofs_y = 0},
    {.bitmap_index = 253, .adv_w = 188, .box_w = 10, .box_h = 17, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 338, .adv_w = 188, .box_w = 11, .box_h = 18, .ofs_x = 0, .ofs_y = 0},
    {.bitmap_index = 437, .adv_w = 188, .box_w = 10, .box_h = 17, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 522, .adv_w = 188, .box_w = 11, .box_h = 18, .ofs_x = 0, .ofs_y = 0},
    {.bitmap_index = 621, .adv_w = 188, .box_w = 10, .box_h = 17, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 706, .adv_w = 188, .box_w = 10, .box_h = 18, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 796, .adv_w = 188, .box_w = 11, .box_h = 18, .ofs_x = 0, .ofs_y = 0},
    {.bitmap_index = 895, .adv_w = 104, .box_w = 4, .box_h = 13, .ofs_x = 1, .ofs_y = -1}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint16_t unicode_list_0[] = {
    0x0, 0xe
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 32, .range_length = 15, .glyph_id_start = 1,
        .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 2, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
    },
    {
        .range_start = 48, .range_length = 11, .glyph_id_start = 3,
        .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static  lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
    .glyph_bitmap = glyph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 2,
    .bpp = 4,
    .kern_classes = 0,
    .bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
    .cache = &cache
#endif
};


/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t font_num24 = {
#else
lv_font_t font_num24 = {
#endif
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 19,          /*The maximum line height required by the font*/
    .base_line = 1,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
    .underline_position = -3,
    .underline_thickness = 2,
#endif
    .dsc = &font_dsc           /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};



#endif /*#if FONT_NUM24*/

